#if !defined(RASTER_ALGORITHM_H)
#define RASTER_ALGORITHM_H

namespace raster {

template <class OP>
void horz_line(int x1, int x2, int y, OP & op) {
	if (x2 < x1)
		std::swap(x1, x2);
	for (int x = x1; x < x2; ++x)
		op(x, y);
}

} // raster

#endif // RASTER_ALGORITHM_H